package io;

import java.io.FileReader;
import java.io.IOException;
import java.io.Reader;

public class Demo8 {
    public static void main(String[] args) throws IOException {
        try(Reader reader = new FileReader("d:/text.txt")){
            while (true){
                int n=reader.read();
                if (n==-1){
                    break;
                }
                char ch=(char) n;
                System.out.println(ch);

            }

        }catch (IOException e){
            e.printStackTrace();
        }
    }
}
